package com.party.core.model.mall;

import com.party.core.model.BaseModel;

/**
 * 展示商品主题
 * Created by wei.li
 *
 * @date 2017/8/24 0024
 * @time 15:06
 */
public class MallShowSubject extends BaseModel {

    //名称
    private String name;

    //内容
    private String content;

    //主题说明
    private String instruction;

    // 购买说明
    private String buyInstruction;

    // 模板编号
    private String templateId;

    // 发布者
    private String publisher;

    // 发布者头像
    private String publisherLogo;

    // 图片
    private String pic;

    // 商品数
    private Integer goodsNum;

    // 机构id
    private String memberId;

    public MallShowSubject(String memberId) {
        this.memberId = memberId;
    }

    public MallShowSubject() {
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getInstruction() {
        return instruction;
    }

    public void setInstruction(String instruction) {
        this.instruction = instruction;
    }

    public String getBuyInstruction() {
        return buyInstruction;
    }

    public void setBuyInstruction(String buyInstruction) {
        this.buyInstruction = buyInstruction;
    }

    public String getTemplateId() {
        return templateId;
    }

    public void setTemplateId(String templateId) {
        this.templateId = templateId;
    }

    public String getPublisher() {
        return publisher;
    }

    public void setPublisher(String publisher) {
        this.publisher = publisher;
    }

    public String getPublisherLogo() {
        return publisherLogo;
    }

    public void setPublisherLogo(String publisherLogo) {
        this.publisherLogo = publisherLogo;
    }

    public String getPic() {
        return pic;
    }

    public void setPic(String pic) {
        this.pic = pic;
    }

    public Integer getGoodsNum() {
        return goodsNum;
    }

    public void setGoodsNum(Integer goodsNum) {
        this.goodsNum = goodsNum;
    }

    public String getMemberId() {
        return memberId;
    }

    public void setMemberId(String memberId) {
        this.memberId = memberId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof MallShowSubject)) return false;
        if (!super.equals(o)) return false;

        MallShowSubject that = (MallShowSubject) o;

        if (name != null ? !name.equals(that.name) : that.name != null) return false;
        if (content != null ? !content.equals(that.content) : that.content != null) return false;
        if (instruction != null ? !instruction.equals(that.instruction) : that.instruction != null) return false;
        if (buyInstruction != null ? !buyInstruction.equals(that.buyInstruction) : that.buyInstruction != null)
            return false;
        if (templateId != null ? !templateId.equals(that.templateId) : that.templateId != null) return false;
        if (publisher != null ? !publisher.equals(that.publisher) : that.publisher != null) return false;
        if (publisherLogo != null ? !publisherLogo.equals(that.publisherLogo) : that.publisherLogo != null)
            return false;
        if (pic != null ? !pic.equals(that.pic) : that.pic != null) return false;
        if (goodsNum != null ? !goodsNum.equals(that.goodsNum) : that.goodsNum != null) return false;
        return memberId != null ? memberId.equals(that.memberId) : that.memberId == null;
    }

    @Override
    public int hashCode() {
        int result = super.hashCode();
        result = 31 * result + (name != null ? name.hashCode() : 0);
        result = 31 * result + (content != null ? content.hashCode() : 0);
        result = 31 * result + (instruction != null ? instruction.hashCode() : 0);
        result = 31 * result + (buyInstruction != null ? buyInstruction.hashCode() : 0);
        result = 31 * result + (templateId != null ? templateId.hashCode() : 0);
        result = 31 * result + (publisher != null ? publisher.hashCode() : 0);
        result = 31 * result + (publisherLogo != null ? publisherLogo.hashCode() : 0);
        result = 31 * result + (pic != null ? pic.hashCode() : 0);
        result = 31 * result + (goodsNum != null ? goodsNum.hashCode() : 0);
        result = 31 * result + (memberId != null ? memberId.hashCode() : 0);
        return result;
    }

    @Override
    public String toString() {
        return "MallShowSubject{" +
                "name='" + name + '\'' +
                ", content='" + content + '\'' +
                ", instruction='" + instruction + '\'' +
                ", buyInstruction='" + buyInstruction + '\'' +
                ", templateId='" + templateId + '\'' +
                ", publisher='" + publisher + '\'' +
                ", publisherLogo='" + publisherLogo + '\'' +
                ", pic='" + pic + '\'' +
                ", goodsNum=" + goodsNum +
                ", memberId='" + memberId + '\'' +
                '}';
    }
}
